<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>购物车</title>
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="./css/bootstrap.min.css" rel="stylesheet">
    
    <script type="text/javascript">
  
	function radioValue(){
	  var rad = document.getElementsByName("role");
	  for(var i=0;i<=rad.length;i++){
	    if(rad[i].checked){
	    alert("提交成功!");
	    return ;
	    }else{
	    alert("请选择地址!");
	    break;
	    }
	  }
	}
    </script>
  </head>
  <body style="background-color:#eee;" >
 <div>
 <table width="24%">
 <tr>
     <td><h3>商品详情</h3></td>
 </tr>
 </table>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>购买商品</th>
			   <th>购买数量</th>
                  <th>商品总价</th>
                </tr>
              </thead>
              <tbody>
              <c:forEach items="${sessionScope.gwc}" var="good">
                <tr>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${good.goodsName}</span></td>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">1</span></td>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${good.goodsPrice}</span></td>
                </tr>
                </c:forEach>
              </tbody>
            </table>
		 
          </div>
		
		 <div class="table-responsive">
		 
		 <form action="/DianShang/user/user_checkOut" method="post">
		 <table class="table table-striped">
              <thead>
                <tr>
                  <th>收件人</th>
			   <th>收货地址</th>
                  <th>联系电话</th>
			   <th>启用地址</th>
                </tr>
              </thead>
              <tbody>
              <c:forEach items="${requestScope.address}" var="add">
                <tr>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${add.realName }</span></td>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${add.address }</span></td>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${add.phone }</span></td>
			   <td style=" line-height:50px;"><input type="radio" name="order.addressId" value="${add.addressId}"/>${add.addressId}</td>
                </tr>
			 </c:forEach>
              </tbody>
            </table>
		  <input type="submit" value="提交" style=" color:#FF0000;" ">
		 </div>
		 </form>

  </body>
</html></em>